<!DOCTYPE html>
<!--conf
<sample>
              <product version="4.0b1" edition="std"/>
                     <modifications>
                            <modified date="130911"/>
                     </modifications>
               </sample>
-->
<html>
<head>
	<title>Skins</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../skins/web/dhtmlx.css"/>
	<link rel="stylesheet" type="text/css" href="../../../skins/terrace/dhtmlx.css"/>
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	<style>
		div.controls {
			margin: 0px 10px;
			font-size: 14px;
			font-family: Tahoma;
			color: #404040;
			height: 80px;
		}
		div#winVP {
			position: relative;
			height: 550px;
			border: #a4bed4 1px solid;
			border-radius: 2px;
			margin: 10px;
		}
	</style>
	<script>
		var dhxWins, w1, w2, w3;
		var iconsPath = {
			dhx_skyblue: "imgs",
			dhx_web: "icons_web",
			dhx_terrace: "icons_terrace"
		};
		
		function doOnLoad(skin) {
			
			skin = skin||"dhx_skyblue";
			
			if (dhxWins == null) {
				dhxWins = new dhtmlXWindows();
			} else {
				w1.close();
				w2.close();
				w3.close();
			}
			dhxWins.setSkin(skin);
			dhxWins.attachViewportTo("winVP");
			
			w1 = dhxWins.createWindow("w1", 20, 30, 420, 300);
			w1.setText("dhtmlxWindow #1");
			
			w2 = dhxWins.createWindow("w2", 50, 70, 420, 300);
			w2.setText("dhtmlxWindow #2");
			
			w3 = dhxWins.createWindow("w3", 580, 110, 420, 300);
			w3.setText("dhtmlxWindow #3");
			
			dhxWins.forEachWindow(function(win){
				
				win.button("close").disable();
				//
				win.attachToolbar({
					icons_path: "../../dhtmlxToolbar/common/"+iconsPath[skin]+"/",
					skin: skin,
					xml: "../../dhtmlxToolbar/common/dhxtoolbar_button.xml"
				});
				
				var myGrid = win.attachGrid();
				myGrid.setImagePath("../../../codebase/imgs/");
				myGrid.loadXML("../common/grid.xml?etc="+new Date().getTime());
				myGrid = null;
				
				win.attachStatusBar({text: "Status bar can be here"});
				
				win.button("help").show();
				
			});
			
		}
		function doOnUnload() {
			if (dhxWins != null && dhxWins.unload != null) {
				dhxWins.unload();
				dhxWins = w1 = w2 = w3 = null;
			}
		}
	</script>
</head>
<body onload="doOnLoad();" onunload="doOnUnload();">
	<div id="winVP"></div>
	<div class="controls">
		<input type="button" value="dhx_skyblue" onclick="doOnLoad('dhx_skyblue');">
		<input type="button" value="dhx_web" onclick="doOnLoad('dhx_web');">
		<input type="button" value="dhx_terrace" onclick="doOnLoad('dhx_terrace');">
	</div>
</body>